const MusicHttp = require("../../utils/MusicHttp")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    city: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad:async function () {
    // CityHttp.getCityHttp().then(res => {
    //   this.setData({
    //     city: res.data.data.hotCities
    //   })
    // })
    var res = await MusicHttp.getCityHttp()
    var city = res.data.data.hotCities
    this.setData({
      city
    })
  },
  handleClick(event) {
    var { city } = event.currentTarget.dataset
    wx.setStorageSync('city', city)
    wx.navigateBack()
  }
})